<?php
class Admin_Model_TableColumn_UsersAdmin {
	const DATE_FORMAT_FULL_EN = 'Y-m-d H:i:s';
	const DATE_FORMAT_FULL_VN = 'd-m-Y H:i:s';
	const DATE_FORMAT_SHORT_VN = 'd-m-Y';

	protected $id;
	protected $email;
	protected $password;
	protected $role;
	protected $ho_ten;
	protected $ngay_sinh;
	protected $hinh_anh;
	protected $dien_thoai;
	protected $dang_nhap_cuoi;
	protected $kich_hoat;
	protected $ngay_tao;
	protected $nguoi_tao;
	protected $ten_nguoi_tao;
	protected $ngay_cap_nhat;
	protected $nguoi_cap_nhat;
	protected $ten_nguoi_cap_nhat;
	protected $da_xoa;
	protected $thanh_pho_phu_trach;
	protected $ten_thanh_pho;
	protected $ten_quyen_han;

	public function __construct(array $options = null) {
		if (is_array($options)) {
			$this->setOptions($options);
		}
	}

	public function __set($name, $value) {
		$method = 'set' . $name;
	
		if (('mapper' == $name) || !method_exists($this, $method)) {
			throw new Exception('Invalid content property');
		}
	
		$this->$method($value);
	}

	public function __get($name) {
		$method = 'get' . $name;
	
		if (('mapper' == $name) || !method_exists($this, $method)) {
			throw new Exception('Invalid content property');
		}
	
		return $this->$method();
	}

	public function setOptions(array $options) {
		$methods = get_class_methods($this);
	
		foreach ($options as $key => $value) {
			$method = 'set' . ucfirst($key);
	
			if (in_array($method, $methods)) {
				$this->$method($value);
			}
		}
	
		return $this;
	}

	public function getId() {
		return $this->id;
	}

	public function setId($id) {
		$this->id = $id;
	}

	public function getEmail() {
		return $this->email;
	}

	public function setEmail($email) {
		$this->email = $email;
	}

	public function setPassword($password) {
		$this->password = $password;
	}

	public function getPassword() {
		return $this->password;
	}

	public function setRole($value) {
		$this->role = $value;
	}

	public function getRole() {
		return $this->role;
	}

	public function getHo_ten() {
		return $this->ho_ten;
	}

	public function setHo_ten($value) {
		$this->ho_ten = $value;
	}

	public function getNgay_sinh() {
		return $this->ngay_sinh;
	}

	public function setNgay_sinh($value) {
		$this->ngay_sinh = $value;
	}

	public function getHinh_anh() {
		return $this->hinh_anh;
	}

	public function setHinh_anh($value) {
		$this->hinh_anh = $value;
	}

	public function getDien_thoai() {
		return $this->dien_thoai;
	}

	public function setDien_thoai($value) {
		$this->dien_thoai = $value;
	}

	public function getDang_nhap_cuoi() {
		return $this->dang_nhap_cuoi;
	}

	public function setDang_nhap_cuoi($value) {
		$this->dang_nhap_cuoi = $value;
	}

	public function getKich_hoat() {
		return $this->kich_hoat;
	}

	public function setKich_hoat($value) {
		$this->kich_hoat = $value;
	}

	public function getNgay_tao() {
		return $this->ngay_tao;
	}

	public function setNgay_tao($value) {
		$this->ngay_tao = $value;
	}

	public function getNguoi_tao() {
		return $this->nguoi_tao;
	}

	public function setNguoi_tao($value) {
		$this->nguoi_tao = $value;
	}

	public function getTen_nguoi_tao() {
		return $this->ten_nguoi_tao;
	}

	public function setTen_nguoi_tao($ten_nguoi_tao) {
		$this->ten_nguoi_tao = $ten_nguoi_tao;
	}

	public function getNgay_cap_nhat() {
		return $this->ngay_cap_nhat;
	}

	public function setNgay_cap_nhat($value) {
		$this->ngay_cap_nhat = $value;
	}

	public function getNguoi_cap_nhat() {
		return $this->nguoi_cap_nhat;
	}

	public function setNguoi_cap_nhat($value) {
		$this->nguoi_cap_nhat = $value;
	}

	public function getTen_nguoi_cap_nhat() {
		return $this->ten_nguoi_cap_nhat;
	}

	public function setTen_nguoi_cap_nhat($ten_nguoi_cap_nhat) {
		$this->ten_nguoi_cap_nhat = $ten_nguoi_cap_nhat;
	}

	public function getDa_xoa() {
		return $this->da_xoa;
	}

	public function setDa_xoa($value) {
		$this->da_xoa = $value;
	}

	public function getThanh_pho_phu_trach() {
		return $this->thanh_pho_phu_trach;
	}

	public function setThanh_pho_phu_trach($value) {
		$this->thanh_pho_phu_trach = $value;
	}

	public function getTen_thanh_pho() {
		return $this->thanh_pho_phu_trach == 0 ? 'Cả nước' : $this->ten_thanh_pho;
	}

	public function setTen_thanh_pho($value) {
		$this->ten_thanh_pho = $value;
	}

	public function getTen_quyen_han() {
		return $this->ten_quyen_han;
	}

	public function setTen_quyen_han($value) {
		$this->ten_quyen_han = $value;
	}

}